﻿@model SuperDumpService.ViewModels.SimilarityModel
@{
	ViewData["Title"] = "Similarity";
}
<br/>
@if (!string.IsNullOrEmpty(Model.Error) || Model.CrashSimilarity == null) {
	<stong>Error: @Model.Error</stong>
} else {

	<h3>Compare Dumps</h3>
	<p>Compared <a href="@SuperDumpService.Helpers.Utility.GetDumpUrl(Model.DumpA)">@Model.DumpA</a> with <a href="@SuperDumpService.Helpers.Utility.GetDumpUrl(Model.DumpB)">@Model.DumpB</a>.</p>

	<dl class="row compact">
		<dt class="col-sm-3 text-right">Overall (average)</dt>
		<dd class="col-sm-9">@Model.CrashSimilarity.OverallSimilarity.ToString("N2")</dd>

		<dt class="col-sm-3 text-right">Stacktrace (fauling thread)</dt>
		<dd class="col-sm-9">@(Model.CrashSimilarity.StackTraceSimilarity.HasValue ? Model.CrashSimilarity.StackTraceSimilarity.Value.ToString("N2") : "-")</dd>

		<dt class="col-sm-3 text-right">Modules (fauling thread)</dt>
		<dd class="col-sm-9">@(Model.CrashSimilarity.ModulesSimilarity.HasValue ? Model.CrashSimilarity.ModulesSimilarity.Value.ToString("N2") : "-")</dd>

		<dt class="col-sm-3 text-right">LastEvent</dt>
		<dd class="col-sm-9">@(Model.CrashSimilarity.LastEventSimilarity.HasValue ? Model.CrashSimilarity.LastEventSimilarity.Value.ToString("N2") : "-")</dd>

		<dt class="col-sm-3 text-right">CLR Exception</dt>
		<dd class="col-sm-9">@(Model.CrashSimilarity.ExceptionSimilarity.HasValue ? Model.CrashSimilarity.ExceptionSimilarity.Value.ToString("N2") : "-")</dd>
	</dl>

}